import React from "react";
class Search extends React.Component{
    constructor(){
        super();
        this.handleSearch = this.handleSearch.bind(this);
    }
    handleSearch(){
        let value = this.refs.msg.value;
        this.props.search(value);
    }
    render(){
        return(
            <section className="jumbotron">
            <h3 className="jumbotron-heading">Search Github Users</h3>
            <div>
                <input ref="msg" type="text" placeholder="enter the name you search" />
                <button onClick={this.handleSearch}>Search</button>
            </div>
            </section>
        )
    }
}
export default Search;